package com.jyw.system.domain.vo;

import com.jyw.common.core.domain.entity.SysDictData;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 沈峻
 * @ClassName DictCacheVo
 * @Description TODO
 * @Date 2023/8/25 17:58
 **/
@Data
@ApiModel("数据字典缓存实体")
@NoArgsConstructor
public class DictCacheVo {

    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("字典标签")
    private String dictLabel;

    @ApiModelProperty("字典键值")
    private String dictValue;

    @ApiModelProperty("上级id")
    private Long parentId;

    @ApiModelProperty("字典类型")
    private String dictType;

    public DictCacheVo(SysDictData dictData) {
        setId(dictData.getDictCode());
        setDictLabel(dictData.getDictLabel());
        setDictValue(dictData.getDictValue());
        setParentId(dictData.getParentId());
        setDictType(dictData.getDictType());
    }
}
